/** * api接口统一管理 */
import { get, post } from './http'


//系统配置
export const apiSystemConfigList = p => get('/AdminServlet/systemConfigList', p) //列表
export const apiSystemConfigUpdate = p => post('/AdminServlet/systemConfigUpdate', p) //更新


//权限管理的
export const apiAdminList = p => get('/AdminPermissionServlet/adminList', p) //管理员账号
export const apiRoleList = p => get('/AdminPermissionServlet/roleList', p) //角色列表
export const apiRoleAdd = p => post('/AdminPermissionServlet/roleAdd', p) //角色增加
export const apiUserRoleEdit = p => post('/AdminPermissionServlet/userRoleEdit', p) //角色增加
export const apiMenuList = p => get('/AdminPermissionServlet/menuList', p) //菜单列表
export const apiRoleMenuList = p => get('/AdminPermissionServlet/roleMenuList', p) //角色的菜单
export const apiRoleMenuUpdate = p => post('/AdminPermissionServlet/roleMenuUpdate', p) //角色的菜单提交
export const apiUserRolePermission = p => get('/AdminPermissionServlet/userRolePermission', p) //用户角色的权限
export const apiMenuDelOfLevel1 = p => get('/AdminPermissionServlet/menuDelOfLevel1', p) //删除一级菜单
export const apiMenuDelOfLevel2 = p => get('/AdminPermissionServlet/menuDelOfLevel2', p) //删除二级菜单

export const apiSystemLog = p => post('/AdminServlet/logsList', p) //系统日志

////////////////////////////////////////////////  业务相关的  /////////////////////////////////////////////////

//微信员工，客户相关
export const apiWxWorkUserList = p => get('/AdminWxServlet/wxWorkUserList', p) //企业成员列表
export const apiWxWorkExternalUserList = p => get('/AdminWxServlet/wxWorkExternalUserList', p) //外部客户列表
export const apiWxWrokUserData = p => get('/AdminWxServlet/userData', p) //员工信息
export const apiWxWrokExternalUserDetail = p => get('/AdminWxServlet/externalUserDeatil', p) //外部客户详情
export const apiWxWorkExternalUserListOfUser = p => get('/AdminWxServlet/wxWorkExternalUserListOfUser', p) //外部客户列表

//卡券相关
export const apiCouponCreateOfBusiness = p => post('/WxCouponAdminServlet/createV3CouponBusiness', p) //创建商家券
export const apiCouponListOfBusiness = p => post('/WxCouponAdminServlet/couponListOfBusiness', p) //商家券列表
export const apiCouponListOfBusinessFetched = p => post('/WxCouponAdminServlet/couponListOfBusinessFetched', p) //客户领取的商家券列表

export const apiGetCallbackUrlOfCouponBusiness = p => get('/WxCouponAdminServlet/getCallbackUrlOfCouponBusiness', p) //读取回调url
export const apiSetCallbackUrlOfCouponBusiness = p => post('/WxCouponAdminServlet/setCallbackUrlOfCouponBusines', p) //设置回调url

export const apiGetCouponDetailForUse = p => get('/WxCouponAdminServlet/couponDetailForUse', p) //卡券详情（用于核销的，塞入了其它东西）
export const apiUseCouponBusiness= p => post('/WxCouponAdminServlet/useCouponBusiness', p) //核销操作


//钱相关的
export const apiUserMoneyLog = p => post('/AdminFinanceServlet/userMoneyLog', p) //资金明细
export const apiUserMoneySettle = p => post('/AdminFinanceServlet/userMoneySettle', p) //用户资金结算操作